/*
 * ClientThread.h
 *
 *  Created on: Dec 19, 2013
 *      Author: vipatil
 */

#ifndef CLIENTTHREAD_H_
#define CLIENTTHREAD_H_

#include "ThreadPool.h"
#include "ServerThread.h"

#include <thread>
#include <string>

namespace ClientThread {

class ClientThread: public ThreadPool::WorkerTask
{
private:
  int _clientFd;
  std::string _threadID;

  ServerThread::ServerThread&  _server;

  void handleConnection();

public:
  ClientThread(int fd, ServerThread::ServerThread& server);
  virtual ~ClientThread();

  void run();

  void handleSMTPConnection();
};
}

#endif /* CLIENTTHREAD_H_ */

